home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iiw3mstr.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  6.7 KB  |  268 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <% if Session("FONTSIZE") = "" then %>
  6.     <!--#include file="iito.inc"-->
  7. <% else %>
  8.     <!--#include file="iiw3mstr.str"-->
  9. <% 
  10. Const HTTPCOMPRESSIONPATH = "IIS://localhost/w3svc/Filters/Compression/Parameters"
  11.  
  12. On Error Resume Next 
  13.  
  14. Dim path,currentobj,Inst
  15.  
  16. path=Session("spath")
  17. Session("path")=path
  18. Session("SpecObj")="IIS://localhost/w3svc/Filters/Compression/Parameters"
  19. Session("SpecProps")="HCDoStaticCompression,HCDoDynamicCompression,HCCompressionDirectory,HCDoDiskSpaceLimiting,HCMaxDiskSpaceUsage"
  20.  
  21. Set currentobj=GetObject(path)
  22.  
  23.  
  24. %>
  25.  
  26. <!--#include file="iiset.inc"-->
  27. <!--#include file="iisetfnt.inc"-->
  28.  
  29. <HTML>
  30. <HEAD>
  31. <TITLE></TITLE>
  32.  
  33. <SCRIPT LANGUAGE="JavaScript">
  34.  
  35. <!--#include file="iijsfuncs.inc"-->
  36.     top.title.Global.helpFileName="iipy_38";
  37.  
  38.     function disableDefault(dir,fromCntrl, toCntrl){
  39.         if (!dir){
  40.             if (fromCntrl.value !=""){
  41.                 toCntrl.value=fromCntrl.value;
  42.                 fromCntrl.value="";
  43.             }
  44.         }
  45.         else{
  46.             if (toCntrl.value !=""){
  47.                 fromCntrl.value=toCntrl.value;
  48.                 toCntrl.value="";
  49.             }
  50.         }
  51.     }
  52.  
  53.     function enableDefault(chkCntrl){
  54.         chkCntrl.checked=true;
  55.     }
  56.     
  57.     function PageValidation()
  58.     {
  59.     }
  60.     validatePage = new PageValidation();
  61.     
  62.     function ContinueSave()
  63.     {
  64.         // Perform any sync validation.
  65.         if( document.userform.HCCompressionDirectory.value == "" )
  66.         {
  67.             alert( "<%= L_NOPATH_ERR %>" );
  68.             document.userform.HCCompressionDirectory.focus();
  69.         }
  70.  
  71.         // We always want to validate the path, so we always return false.
  72.         return false;
  73.     }
  74.     function SaveCallback()
  75.     {
  76.         // Called back from iitool if ContinueSave returns false
  77.         
  78.         // Perform any async (ASP) based validation
  79.         path = document.userform.HCCompressionDirectory.value;
  80.         if( path != "" )
  81.         {
  82.             parent.hlist.location.href = "iichkpath.asp?path=" + escape(path) + "&ptype=0" +
  83.                                          "&donext=top.body.tool.toolFuncs.dosave();";
  84.         }
  85.         // If path is empty just return without saving.
  86.     }
  87.     
  88.     function checkValueChange( ctrl )
  89.     {
  90.         if( !top.title.Global.updated )
  91.         {
  92.             if( ctrl.value != ctrl.defaultValue )
  93.             {
  94.                 top.title.Global.updated = true;
  95.             }
  96.         }
  97.     }
  98.  
  99.     function MtoB(thiscntrl){
  100.         num = parseInt(thiscntrl.value);
  101.         if (!isNaN(num)){
  102.             return thiscntrl.value *  1048576;
  103.         }
  104.     }
  105.     
  106.     function BtoM(thiscntrl){
  107.         num = parseInt(thiscntrl.value);
  108.         if (!isNaN(num)){
  109.             return thiscntrl.value/1048576;
  110.         }
  111.     }
  112.  
  113. </SCRIPT>
  114.  
  115. <% if Session("canBrowse") then %>
  116. <SCRIPT SRC="JSDirBrowser/JSBrowser.js">
  117. </SCRIPT>
  118. <SCRIPT>
  119.  
  120. JSBrowser = new BrowserObj(null,false,TDIR,<%= Session("FONTSIZE") %>);
  121.  
  122. function BrowserObjSetPathOverride()
  123. {
  124.     if( this.currentPath != "" )
  125.     {
  126.         this.pathCntrl.value = this.currentPath;         
  127.         this.pathCntrl.focus();
  128.         this.pathCntrl.blur();
  129.     }
  130. }
  131.  
  132. function popBrowser()
  133. {
  134.     JSBrowser = new BrowserObj(document.userform.HCCompressionDirectory,false,TDIR,<%= Session("FONTSIZE") %>);
  135.     JSBrowser.BrowserObjSetPath = BrowserObjSetPathOverride;
  136.     JSBrowser.BrowserObjOpen();
  137. }
  138. </SCRIPT>
  139. <% end if %>
  140.  
  141. </HEAD>
  142.  
  143. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000">
  144. <TABLE WIDTH = 500 BORDER = 0>
  145. <TR>
  146. <TD>
  147.  
  148. <FORM NAME="userform">
  149. <%= sFont("","","",True) %>
  150.  
  151. <B><%= L_MASTERPROPS_TEXT %></B>
  152.  
  153.  
  154. <P>
  155.  
  156. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  157. <%= L_DEFAULTWEBSITE_TEXT %>
  158. <IMG SRC="images/hr.gif" WIDTH=<%= L_DEFAULTWEBSITE_HR %> HEIGHT=2 BORDER=0 ALIGN="middle">
  159. <P>
  160. <TABLE WIDTH = 400>
  161.     <TR>
  162.         <TD>
  163.             <%= sFont("","","",True) %>
  164.                 <%= L_DEFWEBTEXT_TEXT %>                
  165.                 <P>
  166.             </FONT>
  167.         </TD>
  168.     </TR>
  169. </TABLE>
  170. <%= writeSelect("DownlevelAdminInstance", "","top.title.Global.updated=true;", false) %>
  171. <%
  172.     For Each Inst in currentobj
  173.         if isNumeric(Inst.Name) then
  174.             if currentobj.DownlevelAdminInstance = Inst.Name then
  175.                 Response.write "<Option Selected VALUE='" & Inst.Name & "'>" &     Inst.ServerComment
  176.             else
  177.                 Response.write "<Option VALUE='" & Inst.Name & "'>" & Inst.ServerComment
  178.             end if
  179.         end if
  180.     Next
  181. %>
  182. </SELECT>
  183. </FONT>
  184.  
  185.  
  186. <%
  187.  
  188. 'Redefine currentobj here so our controls will still work... 
  189. ' we need to be reading data from the Http Compression node.
  190.  
  191. Set currentobj=GetObject(HTTPCOMPRESSIONPATH)
  192.  
  193. 'If we get an error reading the compression properties, then the filter
  194. 'has been uninstalled. We will then hide the whole compression properties
  195. 'section.
  196. %>
  197. <% if err = 0 then %>
  198. <P>
  199. <%= sFont("","","",True) %>
  200.  
  201. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  202. <%= L_HTTPCOMPRESS %>
  203. <IMG SRC="images/hr.gif" WIDTH=<%= L_HTTPCOMPRESS_HR %> HEIGHT=2 BORDER=0 ALIGN="middle">
  204. </FONT>    
  205. <P>
  206. <TABLE BORDER=0 BGCOLOR="<%= Session("BGCOLOR") %>" CELLPADDING=0 CELLSPACING=0>
  207. <TR>
  208.     <TD COLSPAN=2>
  209.         <%= sFont("","","",True) %>
  210.             <%= checkbox("HcDoStaticCompression","",false) %>
  211.             <%= L_STATICFILES %><BR>
  212.             <%= checkbox("HCDoDynamicCompression","",false) %>
  213.             <%= L_APPFILES %>            <P>
  214.         </FONT>
  215.     </TD>
  216. </TR>
  217.  
  218. <TR>
  219.     <TD VALIGN = "top">
  220.         <%= sFont("","","",True) %>
  221.             <%= L_TEMPFOLDER %>            
  222.         </FONT>
  223.     </TD>
  224.     <TD VALIGN = "top" ALIGN="right">
  225.         <%= sFont("","","",True) %>
  226.             <%= text("HCCompressionDirectory",L_TEMPFOLDER_NUM,"","","checkValueChange(this);",true,false) %>
  227.             <P>
  228.             <INPUT TYPE="button" NAME="hdnBrowser" VALUE="<%= L_BROWSE_TEXT %>" OnClick="popBrowser();">        
  229.         </FONT>
  230.     </TD>
  231. </TR>
  232.  
  233. <TR>
  234.     <TD VALIGN = "top">
  235.         <%= sFont("","","",True) %>
  236.             <%= L_MAXFOLDERSIZE %>                
  237.         </FONT>
  238.     </TD>
  239.     <TD VALIGN = "top">
  240.         <%= sFont("","","",True) %>
  241.             <INPUT TYPE="hidden" NAME="HCDoDiskSpaceLimiting" VALUE="<%= currentobj.HCDoDiskSpaceLimiting %>">
  242.         
  243.             <%= printradio("HCDoDiskSpaceLimiting", not currentobj.HCDoDiskSpaceLimiting,"document.userform.HCDoDiskSpaceLimiting.value = 'False';setCntrlState(false,hdnHCMaxDiskSpaceUsage);",true) %>
  244.             <%= L_UNLIMITED %>
  245.             <P>
  246.             <%= printradio("HCDoDiskSpaceLimiting", currentobj.HCDoDiskSpaceLimiting,"document.userform.HCDoDiskSpaceLimiting.value = 'True';setCntrlState(true,hdnHCMaxDiskSpaceUsage);",true) %>
  247.             <%= L_LIMITTO %>: 
  248.             <%= inputbox(0,"text","hdnHCMaxDiskSpaceUsage", cInt(currentobj.HCMaxDiskSpaceUsage/1048576),L_LIMITTO_NUM,"","", "isNum(this,1,4294967295);HCMaxDiskSpaceUsage.value=MtoB(hdnHCMaxDiskSpaceUsage);HCDoDiskSpaceLimiting.value = 'True';rdoHCDoDiskSpaceLimiting[1].checked=true;",False,False,False) %>
  249.              <%= L_MB %>
  250.             <BR>
  251.             <%= writehidden("HCMaxDiskSpaceUsage") %>
  252.         
  253.         </FONT>
  254.     </TD>
  255. </TR>
  256. </TABLE>
  257. <SCRIPT LANGUAGE="JavaScript">
  258.     setCntrlState(document.userform.rdoHCDoDiskSpaceLimiting[1].checked,document.userform.hdnHCMaxDiskSpaceUsage);
  259. </SCRIPT>
  260. <% end if %>
  261.  
  262. </BODY>
  263. </HTML>
  264. </FORM>
  265. </TD>
  266. </TR>
  267. </TABLE>
  268. <% end if %>